File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 11"use client" ;
2- import React , { useState } from "react" ;
2+ import React , { useState , useEffect } from "react" ;
33import Image from "next/image" ;
44import { LargeTextInputComponent } from "./LargeTextInputComponent" ;
55import { LargeButtonComponent } from "./LargeButtonComponent" ;
@@ -12,6 +12,12 @@ export default function Page() {
1212 const [ fullscreenContent , setFullscreenContent ] = useState ( "" ) ;
1313 const [ orientation , setOrientation ] = useState < "horizontal" | "vertical" | undefined > ( "horizontal" ) ;
1414 const [ isFullscreen , setFullscreen ] = useState ( false ) ;
15+
16+ useEffect ( ( ) => {
17+ const hash = decodeURI ( window . location . hash ) ?? "" ;
18+ setText ( hash . replace ( / ^ # / , "" ) ) ;
19+ } , [ ] ) ;
20+
1521 return ( < div className = { styles . page } >
1622 < div className = { [ styles . BigTextConfig , isFullscreen ? styles . hidden : undefined ] . filter ( item => item ) . join ( " " ) } >
1723 < LargeTextInputComponent
You can’t perform that action at this time.
0 commit comments