This file contains hidden or 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
| // Data fetching hook | |
| import useSWR from 'swr' | |
| const useUser(userId) { | |
| const fetcher = (...args) => fetch(...args).then(res => res.json()) | |
| const { data, error } = useSWR(`/api/user/${userId}`, fetcher) | |
| return { | |
| user: data, | |
| error, |
This file contains hidden or 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
| import { createMachine, interpret, assign } from 'xstate'; | |
| const fetchMachine = createMachine({ | |
| id: 'Dog API', | |
| initial: 'idle', | |
| context: { | |
| dog: null | |
| }, | |
| states: { | |
| idle: { |
This file contains hidden or 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
| const apiReducer = (state = {}, action) => { | |
| switch (action.type) { | |
| case "START_FETCH_USERS": | |
| return { | |
| ...state, | |
| users: { success: false, loading: true, error: false, data: [] } | |
| } | |
| case "FETCH_USERS_SUCCESS": | |
| return { | |
| ...state, |
This file contains hidden or 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
| { | |
| users: [{ id: "1231", username: "Dale" }, { id: "1235", username: "Sarah"}] | |
| } | |
| { | |
| type: "ADD_USER", | |
| payload: { user: { id: "5123", username: "Kyle" } } | |
| } | |
| const userReducer = (state, action) => { |
This file contains hidden or 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
| { | |
| "$schema": "https://aka.ms/terminal-profiles-schema", | |
| "copyFormatting": "none", | |
| "copyOnSelect": true, | |
| "defaultProfile": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}", | |
| "initialCols": 170, | |
| "initialRows": 50, | |
| // Add custom keybindings to this array. | |
| // To unbind a key combination from your defaults.json, set the command to "unbound". | |
| // To learn more about keybindings, visit https://aka.ms/terminal-keybindings |
This file contains hidden or 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
| module.exports = { | |
| settings: { | |
| react: { | |
| pragma: 'React', | |
| version: '17.0.1', | |
| }, | |
| }, | |
| env: { | |
| browser: true, | |
| es6: true, |
This file contains hidden or 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
| { | |
| "window.zoomLevel": -0.5, | |
| "editor.mouseWheelZoom": true, | |
| "workbench.iconTheme": "eq-material-theme-icons-darker", | |
| // "editor.fontFamily": "'Fira Code'", | |
| // "terminal.integrated.fontFamily": "'Fira Code'", | |
| // "editor.fontFamily": "Victor Mono", | |
| // "terminal.integrated.fontFamily": "Victor Mono", | |
| "editor.fontFamily": "JetBrains Mono", | |
| "terminal.integrated.fontFamily": "JetBrains Mono", |
This file contains hidden or 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
| // Store Items | |
| const [content, setContent] = useState<string>(""); | |
| const [dContent, setDContent] = useState<string>(""); | |
| // SunEditor with props | |
| <SunEditor | |
| setOptions={{ buttonList: complex_modified }} | |
| setDefaultStyle="height:auto" | |
| onPaste={handlePaste} | |
| appendContents={content} |
This file contains hidden or 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
| if (setSearchView === "searchtenant") { | |
| inQuery.push({ Building: { $in: buildingId } }); | |
| orQuery.push({ | |
| "CompanyTBL.TenantNumber": { $regex: text, $options: "i" } | |
| }); | |
| orQuery.push({ | |
| TenantName: { $regex: text, $options: "i" } |
This file contains hidden or 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
| # Task Description | |
| Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. | |
| ## What is included in this PR | |
| Give a brief of what's have been done | |
| ## Jira Issue Link | |
| Put the Jira link of the issue |