test: Add file_location test and mock settings in ytdlpVideo
This commit is contained in:
@@ -92,7 +92,7 @@ const SettingsPage: React.FC = () => {
|
||||
const isSticky = useStickyButton(observerTarget);
|
||||
|
||||
// Fetch settings
|
||||
const { data: settingsData } = useQuery({
|
||||
const { data: settingsData, refetch } = useQuery({
|
||||
queryKey: ['settings'],
|
||||
queryFn: async () => {
|
||||
const response = await axios.get(`${API_URL}/settings`);
|
||||
@@ -100,6 +100,10 @@ const SettingsPage: React.FC = () => {
|
||||
}
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
refetch();
|
||||
}, [refetch]);
|
||||
|
||||
useEffect(() => {
|
||||
if (settingsData) {
|
||||
const newSettings = {
|
||||
|
||||
Reference in New Issue
Block a user