aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/AnotherComponent.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/AnotherComponent.tsx')
-rw-r--r--src/components/AnotherComponent.tsx28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/components/AnotherComponent.tsx b/src/components/AnotherComponent.tsx
deleted file mode 100644
index f74e924..0000000
--- a/src/components/AnotherComponent.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-import React, { useState, useEffect } from 'react';
-
-const AnotherComponent: React.FC = () => {
- const [selectedWorld, setSelectedWorld] = useState<string | null>(null);
-
- useEffect(() => {
- // Load selected world from localStorage
- const savedWorld = localStorage.getItem('selectedWorld');
- if (savedWorld) {
- setSelectedWorld(savedWorld);
- }
- }, []);
-
- return (
- <div>
- <p>Selected World: {selectedWorld}</p>
- <button onClick={() => {
- const newWorld = 'New World';
- setSelectedWorld(newWorld);
- localStorage.setItem('selectedWorld', newWorld); // Save to localStorage
- }}>
- Change World
- </button>
- </div>
- );
-};
-
-export default AnotherComponent; \ No newline at end of file
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage