Add inline code documentation
This commit is contained in:
parent
6867984659
commit
21d63be4b4
10 changed files with 12 additions and 0 deletions
|
|
@ -54,6 +54,7 @@ export default function ParameterComponent({
|
|||
const { closePopUp } = useContext(PopUpContext);
|
||||
const { setTabsState, tabId, save } = useContext(TabsContext);
|
||||
|
||||
// Update component position
|
||||
useEffect(() => {
|
||||
if (ref.current && ref.current.offsetTop && ref.current.clientHeight) {
|
||||
setPosition(ref.current.offsetTop + ref.current.clientHeight / 2);
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ export default function FloatComponent({
|
|||
const min = 0;
|
||||
const max = 1;
|
||||
|
||||
// Clear component state
|
||||
useEffect(() => {
|
||||
if (disabled) {
|
||||
setMyValue("");
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ export default function Header() {
|
|||
|
||||
const [stars, setStars] = useState(null);
|
||||
|
||||
// Get and set numbers of stars on header
|
||||
useEffect(() => {
|
||||
async function fetchStars() {
|
||||
const starsCount = await getRepoStars("logspace-ai", "langflow");
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ export default function InputComponent({
|
|||
const { setDisableCopyPaste } = useContext(TabsContext);
|
||||
const { closePopUp } = useContext(PopUpContext);
|
||||
|
||||
// Clear component state
|
||||
useEffect(() => {
|
||||
if (disabled) {
|
||||
setMyValue("");
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ export default function InputFileComponent({
|
|||
const [loading, setLoading] = useState(false);
|
||||
const { setErrorData } = useContext(alertContext);
|
||||
const { tabId } = useContext(TabsContext);
|
||||
|
||||
// Clear component state
|
||||
useEffect(() => {
|
||||
if (disabled) {
|
||||
setMyValue("");
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ export default function IntComponent({
|
|||
const min = 0;
|
||||
const { closePopUp } = useContext(PopUpContext);
|
||||
|
||||
// Clear component state
|
||||
useEffect(() => {
|
||||
if (disabled) {
|
||||
setMyValue("");
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ export default function TextAreaComponent({
|
|||
const { openPopUp, closePopUp } = useContext(PopUpContext);
|
||||
const { setDisableCopyPaste } = useContext(TabsContext);
|
||||
|
||||
// Clear text area
|
||||
useEffect(() => {
|
||||
if (disabled) {
|
||||
setMyValue("");
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ export default function ToggleComponent({
|
|||
setEnabled,
|
||||
disabled,
|
||||
}: ToggleComponentType) {
|
||||
|
||||
// set component state as disabled
|
||||
useEffect(() => {
|
||||
if (disabled) {
|
||||
setEnabled(false);
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ export default function CodeAreaModal({
|
|||
}
|
||||
}
|
||||
|
||||
// Check for custom code errors
|
||||
function handleClick() {
|
||||
postValidateCode(code)
|
||||
.then((apiReturn) => {
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ export default function CommunityPage() {
|
|||
}
|
||||
const navigate = useNavigate();
|
||||
|
||||
// Show community examples on page start
|
||||
useEffect(() => {
|
||||
handleExamples();
|
||||
}, []);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue