This repository has been archived by the owner on Oct 29, 2024. It is now read-only.
forked from sudo-puritin/diy-tutorial-video
-
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.
- Loading branch information
Thinh Nguyen D
committed
Oct 2, 2024
1 parent
0910942
commit 1d5dca8
Showing
23 changed files
with
718 additions
and
338 deletions.
There are no files selected for viewing
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,15 @@ | ||
import { configureStore } from "@reduxjs/toolkit"; | ||
|
||
import userReducer from "../features/User/userSlice"; | ||
import videoReducer from "../features/Video/videoSlice"; | ||
|
||
const rootReducer = { | ||
user: userReducer, | ||
video: videoReducer, | ||
}; | ||
|
||
const store = configureStore({ | ||
reducer: rootReducer, | ||
}); | ||
|
||
export default store; |
Empty file.
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,13 @@ | ||
.toolOption_box { | ||
width: 100%; | ||
height: 40px; | ||
max-width: 875px; | ||
.MuiOutlinedInput-input { | ||
display: flex !important; | ||
gap: 1px; | ||
align-items: baseline; | ||
.MuiListItemText-root { | ||
flex: none; | ||
} | ||
} | ||
} |
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,49 @@ | ||
import * as React from "react"; | ||
import { TOOLS_OPTION } from "../../constants/hompage.constants"; | ||
import { Controller, useFormContext } from "react-hook-form"; | ||
import "./ToolsMultipleSelect.scss"; | ||
|
||
import MenuItem from "@mui/material/MenuItem"; | ||
import ListItemText from "@mui/material/ListItemText"; | ||
import Select from "@mui/material/Select"; | ||
|
||
const ToolsMultipleSelect = ({ name, field, ...other }) => { | ||
const [toolName, setToolName] = React.useState([]); | ||
const { control } = useFormContext(); | ||
|
||
const handleChange = (event) => { | ||
console.log("🚀 Puritin ~ handleChange ~ event:", event.target.value); | ||
setToolName(event.target.value); | ||
}; | ||
|
||
return ( | ||
<Controller | ||
name={name} | ||
control={control} | ||
render={({ field, fieldState: { error } }) => ( | ||
<Select | ||
className="toolOption_box" | ||
{...field} | ||
multiple | ||
displayEmpty | ||
error={!!error} | ||
value={toolName} | ||
onChange={handleChange} | ||
renderValue={ | ||
toolName.length > 0 ? undefined : () => <em>Select your tool(s)</em> | ||
} | ||
{...other} | ||
> | ||
{TOOLS_OPTION.map((tool) => ( | ||
<MenuItem key={tool.value} value={tool.value}> | ||
{/* <Checkbox checked={toolName.includes(tool.label)} /> */} | ||
<ListItemText primary={tool.label} /> | ||
</MenuItem> | ||
))} | ||
</Select> | ||
)} | ||
/> | ||
); | ||
}; | ||
|
||
export default ToolsMultipleSelect; |
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,20 @@ | ||
.avatar_box { | ||
position: relative; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
cursor: pointer; | ||
|
||
.photoIcon_box { | ||
position: absolute; | ||
visibility: hidden; | ||
} | ||
&:hover { | ||
filter: brightness(50%); | ||
.photoIcon_box { | ||
top: 40%; | ||
left: 38%; | ||
visibility: visible; | ||
} | ||
} | ||
} |
Oops, something went wrong.