Download next.js/test/e2e/app-dir/app-external/app/optout/action/page.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 452 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/app-dir/app-external/app/optout/action/page.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/next.js/test/e2e/app-dir/app-external/app/optout/action/page.js
-
curl -L -o page.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/next.js/test/e2e/app-dir/app-external/app/optout/action/page.js
452 Bytes
| 'use client' | |
| import { useState } from 'react' | |
| import { getDualOptoutValue } from './actions' | |
| export default function Page() { | |
| const [optoutDisplayValue, setOptoutDisplayValue] = useState('') | |
| return ( | |
| <div id="dual-pkg-outout"> | |
| <p>{optoutDisplayValue}</p> | |
| <button | |
| onClick={async () => { | |
| setOptoutDisplayValue(await getDualOptoutValue()) | |
| }} | |
| > | |
| dual-pkg-optout | |
| </button> | |
| </div> | |
| ) | |
| } | |