Skip to content

Commit

Permalink
Merge pull request #2 from LishuGupta652/globalstate
Browse files Browse the repository at this point in the history
Refactoring folder structure
  • Loading branch information
LishuGupta652 authored Aug 18, 2023
2 parents 590dcb9 + 7e66add commit c08e554
Show file tree
Hide file tree
Showing 32 changed files with 21 additions and 35 deletions.
File renamed without changes.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
.next
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
35 changes: 0 additions & 35 deletions geoattend/.gitignore

This file was deleted.

Empty file removed geoattend/README.md
Empty file.
5 changes: 5 additions & 0 deletions next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use client"

import Link from 'next/link';
import React, { useContext } from 'react'
import { AppContext, APP_STATE_ACTION } from '../contextApi/AppContext';

Expand All @@ -16,6 +17,7 @@ const Child = () => {

return (
<>
<Link href='/maps'>Maps</Link>
<div>Child</div>
<div>{state.theme}</div>
<button onClick={setState}>Button</button>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
13 changes: 13 additions & 0 deletions src/app/maps/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"use client";
import React from 'react'
import { AppContext } from '../contextApi/AppContext';

const page = () => {
const { state } = React.useContext(AppContext);

return (
<div>page state : {state.theme} </div>
)
}

export default page
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit c08e554

Please sign in to comment.