PHP 8.2.30
Preview: FooterCustomize.jsx Size: 5.94 KB
/proc/thread-self/root/home/byroehnu/easetack.com/resources/js/Admin/Components/SectionCustomize/FooterCustomize.jsx

import React, { useEffect, useState } from "react"
import { useDispatch, useSelector } from "react-redux"
import { produce } from "immer"
import { updateFooter } from "@/Redux/features/pages/Customize/customize"

export default function FooterCustomize() {
    const footer = useSelector((state) => state.customize.footer)
    const dispatch = useDispatch()
    const [data, setData] = useState({
        ...footer,
        footer_is_show_social_media: footer.footer_is_show_social_media === "1",
        footer_is_show_newslatter: footer.footer_is_show_newslatter === "1",
        footer_is_show_contact_logo_section: footer.footer_is_show_contact_logo_section === "1",
        footer_is_show_useful_links_section: footer.footer_is_show_useful_links_section === "1",
        footer_is_show_service_section: footer.footer_is_show_service_section === "1",
        footer_is_show_resources_section: footer.footer_is_show_resources_section === "1"
    })

    useEffect(() => {
        dispatch(updateFooter(data))
    }, [data])

    return (
        <>
            <div className="form-group">
                <label htmlFor="" style={{ display: "flex", gap: "10px" }}>
                    Show Social Media:
                    <div
                        className={`yoo-switch ${data.footer_is_show_social_media ? "active" : ""}`}
                        onClick={() =>
                            setData(
                                produce((draft) => {
                                    draft.footer_is_show_social_media = !draft.footer_is_show_social_media
                                })
                            )
                        }
                    >
                        <div className="yoo-switch-in" />
                    </div>
                </label>
            </div>
            <div className="form-group">
                <label htmlFor="" style={{ display: "flex", gap: "10px" }}>
                    Show Newslatter:
                    <div
                        className={`yoo-switch ${data.footer_is_show_newslatter ? "active" : ""}`}
                        onClick={() =>
                            setData(
                                produce((draft) => {
                                    draft.footer_is_show_newslatter = !draft.footer_is_show_newslatter
                                })
                            )
                        }
                    >
                        <div className="yoo-switch-in" />
                    </div>
                </label>
            </div>
            <div className="form-group">
                <label htmlFor="" style={{ display: "flex", gap: "10px" }}>
                    Show Contact Logo Section:
                    <div
                        className={`yoo-switch ${data.footer_is_show_contact_logo_section ? "active" : ""}`}
                        onClick={() =>
                            setData(
                                produce((draft) => {
                                    draft.footer_is_show_contact_logo_section = !draft.footer_is_show_contact_logo_section
                                })
                            )
                        }
                    >
                        <div className="yoo-switch-in" />
                    </div>
                </label>
            </div>
            <div className="form-group">
                <label htmlFor="" style={{ display: "flex", gap: "10px" }}>
                    Show Useful Links Section:
                    <div
                        className={`yoo-switch ${data.footer_is_show_useful_links_section ? "active" : ""}`}
                        onClick={() =>
                            setData(
                                produce((draft) => {
                                    draft.footer_is_show_useful_links_section = !draft.footer_is_show_useful_links_section
                                })
                            )
                        }
                    >
                        <div className="yoo-switch-in" />
                    </div>
                </label>
            </div>
            <div className="form-group">
                <label htmlFor="" style={{ display: "flex", gap: "10px" }}>
                    Show Service Section:
                    <div
                        className={`yoo-switch ${data.footer_is_show_service_section ? "active" : ""}`}
                        onClick={() =>
                            setData(
                                produce((draft) => {
                                    draft.footer_is_show_service_section = !draft.footer_is_show_service_section
                                })
                            )
                        }
                    >
                        <div className="yoo-switch-in" />
                    </div>
                </label>
            </div>
            <div className="form-group">
                <label htmlFor="" style={{ display: "flex", gap: "10px" }}>
                    Show Resources Section:
                    <div
                        className={`yoo-switch ${data.footer_is_show_resources_section ? "active" : ""}`}
                        onClick={() =>
                            setData(
                                produce((draft) => {
                                    draft.footer_is_show_resources_section = !draft.footer_is_show_resources_section
                                })
                            )
                        }
                    >
                        <div className="yoo-switch-in" />
                    </div>
                </label>
            </div>
            <div className="form-group">
                <label>Copyright Text</label>
                <input
                    type="text"
                    value={data.copyright_text}
                    onChange={(e) => setData({ ...data, copyright_text: e.target.value })}
                    className="form-control"
                />
            </div>
        </>
    )
}

Directory Contents

Dirs: 0 × Files: 46

Name Size Perms Modified Actions
45.25 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
16.62 KB lrw-rw-rw- 2025-05-08 11:48:26
Edit Download
36.11 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
8.64 KB lrw-rw-rw- 2025-04-25 15:28:35
Edit Download
14.61 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
16.47 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
12.45 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
19.87 KB lrw-rw-rw- 2025-04-20 06:37:35
Edit Download
72.27 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
43.25 KB lrw-rw-rw- 2025-05-08 11:48:26
Edit Download
40.14 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
13.56 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
1.47 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
2.90 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
1.57 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
17.25 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
24.17 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
5.94 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
10.42 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
8.46 KB lrw-rw-rw- 2025-04-25 15:52:04
Edit Download
5.21 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
84.26 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
56.96 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
729 B lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
15.71 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
4.80 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
14.15 KB lrw-rw-rw- 2025-04-17 09:57:57
Edit Download
14.85 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
11.61 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
12.25 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
20.19 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
17.90 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
48.19 KB lrw-rw-rw- 2025-04-22 07:42:55
Edit Download
12.22 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
74.68 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
3.64 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
7.26 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
1.22 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
11.45 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
14.36 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
28.25 KB lrw-rw-rw- 2025-05-15 11:24:11
Edit Download
46.22 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
5.24 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
10.28 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
22.10 KB lrw-rw-rw- 2025-04-08 04:12:57
Edit Download
19.77 KB lrw-rw-rw- 2025-04-22 07:42:55
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).