-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fått enkel innlogging til å funke * fått create user til å funke ish * fixed login in header * unstable finished * change api endpoint fro 8080 to 8000 * kommentert ut litt kode som skal brukes senere. * updated browser-list-db because azure static check asked me to do so * added linebreak to run azure static web apps i github * lagt til createUser komponent * Det funker plz! * Lagt til knapp til å komme seg tilbake til arkivsjef side * Lagt til input for fornavn og etternav,endret på styling også * begynt på side for endring av photgangbangers * FIX AZURE error lol * lagt til mulighet til å redigere info til en photogangbanger * Fikset og stylet redigeringSide, kan nå trykke på switch for om bruker er pang og eller aktiv * Slettet noen console logs * Fjerne enda none til console logs * Dummy commit * oppdatert Azure/msal/browser * Endret noen små feil * slettet kommentar * Endret på utsende på gridImageViewer, ser litt bedre ut nå * Gjorde rammene rundt bildene litt tynnere * Kan nå søke gjennom suggestions * kan nå søke ved å trykke enter, eller trykke på søke knappen * sonar cloud endringer * Oppdatert msal * Tester med å gjøre en liten endring * Fjernet noen imports som ikke ble brukt --------- Co-authored-by: Marius Bølset Gisleberg <[email protected]>
- Loading branch information
Showing
7 changed files
with
89 additions
and
24 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React, { useState } from 'react' | ||
import { useContext, createContext } from 'react'; | ||
|
||
export interface SearchContextType { | ||
searchQuery: string; | ||
setSearchQuery: React.Dispatch<React.SetStateAction<string>>; | ||
} | ||
|
||
|
||
const SearchContext = createContext<SearchContextType | undefined>(undefined); | ||
|
||
export const useSearchContext = () => useContext(SearchContext); | ||
|
||
const SearchProvider: React.FC<{ children: React.ReactNode }> = ({ children }) => { | ||
const [searchQuery, setSearchQuery] = useState<string>(""); | ||
return ( | ||
<SearchContext.Provider value={{ searchQuery, setSearchQuery }}> | ||
{children} | ||
</SearchContext.Provider> | ||
); | ||
}; | ||
|
||
export default SearchProvider |