Skip to content

Commit f092344

Browse files
committed
remove prepending hash
1 parent 4660878 commit f092344

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/bigtextview/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ export default function Page() {
77
const [text, setText] = useState("");
88

99
useEffect(() => {
10-
const hash = window.location.hash;
11-
setText(hash);
10+
const hash = window.location.hash ?? "";
11+
setText(hash.replace(/^#/, ""));
1212
}, []);
1313

1414
return(<div className={styles.BigTextView}>

0 commit comments

Comments
 (0)